package org.jeecg.modules.zhima.rule;

import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import org.jeecg.modules.zhima.portal.domain.Game;
import org.jeecg.modules.zhima.rule.domain.Rule;


public class GameRuleA implements IGameRule{
    @Override
    public Integer getJoinRule() {
        return null;
    }

    @Override
    public Integer getJoinFee() {
        return null;
    }

    @Override
    public String getMaxAward(Game game) {
        if (ObjectUtils.isNotEmpty(game.getJoinNum())){
            return game.getJoinNum() + " 积分";
        }
        return "";
    }

    @Override
    public double getIntegral(Rule rule) {
        return (double) rule.getJoinNum()/rule.getRanking();
    }

    public static void main(String[] args) {
        Long i = 20l;
        Long r = 3l;
        Long d = i/r;
        System.out.printf(""+d);
    }
}
